function e(str){
    return document.querySelector(str)
}
const box=e('.box').style.background='red';
const win=window.getComputedStyle(e('.box'))['width'];
console.log(win)
/* 
function getStyle(obj,attr){
    if(obj.currentStyle){
        return obj.currentStyle[attr]
    }else{
        return getComputedStyle(obj)[attr]
    }
}
getStyle(e('.div'),'backgroundColor'); */